import request from '@/router/axios';

// 查询crm客户
export function getCustomerList(obj) {
    return request({
        url: '/cp/add-customer/page',
        method: 'get',
        params: obj
    });
}

// 通知客户经理(批量)
export function noticeManagerAll(obj) {
    return request({
        url: '/cp/add-customer/msg',
        method: 'get',
        params: obj
    });
}

// 通知客户经理(单个)
export function noticeManagerOne(obj) {
    return request({
        url: '/cp/add-customer/msg-one',
        method: 'get',
        params: obj
    });
}

// 改变状态
export function changeState(obj) {
    return request({
        url: '/cp/add-customer/change',
        method: 'get',
        params: obj
    });
}

// 查询crm列表
export function getCrmList(obj) {
    return request({
        url: '/cp/add-customer/crm-cust-page',
        method: 'get',
        params: obj
    });
}

// excel模板导出
export function downloadExcel(obj) {
    return request({
        url: '/cp/add-customer/output-excel',
        method: 'post',
        responseType: 'blob'
    });
}

// crm数据统计
export function getCrmStatistics(deptId) {
    return request({
        url: `/cp/add-customer/statistics/${deptId}`,
        method: 'get'
    });
}

// crm数据统计分页
export function getCrmStatisPage(obj) {
    return request({
        url: `/cp/add-customer/statistics-page/${obj.deptId}`,
        method: 'get',
        params: obj
    });
}
